package com.yunhe.portal.repository;

import com.yunhe.portal.domain.DataBannerInfo;
import com.yunhe.portal.model.BannerInfoQueryCondition;
import com.yunhe.portal.model.DataBannerInfoVo;
import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName: DataBannerInfoRepository
 * @Description:
 * @author: GongDaCheng
 * @Date: 10:10 2021/10/22
 */
@Repository
public interface DataBannerInfoRepository {

    /**
     * @Description 新增Banner
     * @Param DataBannerInfo dataBannerInfo
     * @Return int
     * @Date 2021/10/22 10:11
     */
    int createDataBannerInfo(DataBannerInfo dataBannerInfo);

    /**
     * @Description 新增Banner
     * @Param DataBannerInfo dataBannerInfo
     * @Return int
     * @Date 2021/10/22 10:12
     */
    int createDataBannerInfoSelective(DataBannerInfo dataBannerInfo);

    /**
     * @Description 删除Banner
     * @Param Long id
     * @Return int
     * @Date 2021/10/22 10:11
     */
    int deleteDataBannerInfoByPrimaryKey(@Param("id") Long id);

    /**
     * @Description 更新Banner
     * @Param DataBannerInfo dataBannerInfo
     * @Return int
     * @Date 2021/10/22 10:12
     */
    int updateDataBannerInfoByPrimaryKey(DataBannerInfo dataBannerInfo);

    /**
     * @Description 更新Banner
     * @Param DataBannerInfo dataBannerInfo
     * @Return int
     * @Date 2021/10/22 10:12
     */
    int updateDataBannerInfoByPrimaryKeySelective(DataBannerInfo dataBannerInfo);

    /**
     * @Description 根据主键查询Banner
     * @Param Long id
     * @Return DataBannerInfo
     * @Date 2021/10/22 10:12
     */
    DataBannerInfo searchDataBannerInfoByPrimaryKey(@Param("id") Long id);

    /**
     * @Description web端根据条件筛选Banner（园区管理端）
     * @Param BannerInfoQueryCondition bannerInfoQueryCondition
     * @Return List<DataBannerInfoVo>
     * @Date 2021/10/22 13:59
     */
    List<DataBannerInfoVo> findStationDataNoticeInfoByCondition(BannerInfoQueryCondition bannerInfoQueryCondition);

    /**
     * @Description web端根据条件筛选Banner（企业小程序端）
     * @Param BannerInfoQueryCondition bannerInfoQueryCondition
     * @Return List<DataBannerInfoVo>
     * @Date 2021/10/22 14:00
     */
    List<DataBannerInfoVo> findCompanyDataNoticeInfoByCondition(BannerInfoQueryCondition bannerInfoQueryCondition);

    /**
     * @Description App前台获取前三个Banner
     * @Param Long stationId
     * @Return List<DataBannerInfo>
     * @Date 2021/10/22 15:21
     */
    List<DataBannerInfo> findAppBanner(Long stationId);

    /**
     * @Description 小程序前台获取前三个Banner
     * @Param Long stationId
     * @Return List<DataBannerInfo>
     * @Date 2021/10/22 15:21
     */
    List<DataBannerInfo> findWeChatBanner(Long stationId);
}
